import request from "@/utils/request";

// 品牌列表
export function brandList(query) {
  return request({
    url: "/commodity/brand/showAllBrandList",
    method: "get",
    params: query,
  });
}
//查询应用场景列表接口
export function tagListAllPri() {
  return request({
    url: "/supplier/tag/tagListAllPri",
    method: "get",
  });
}

//获取商品分类列表
export function category() {
  return request({
    url: "/supplier/category/showProductCategoryPri",
    method: "get",
  });
}
//根据分类搜索
export function categoryGoods(data) {
  return request({
    url: "/supplier/goods/categoryGoods/lists",
    method: "get",
    params: data,
  });
}
// 查询商城商品列表
export function getPriList(data) {
  return request({
    url: "/supplier/localProduct/priList",
    method: "get",
    params: data,
  });
}
// 删除商城商品
export function delProduct(mallId) {
  return request({
    url: "/supplier/localProduct/removePri/" + mallId,
    method: "delete",
  });
}
//议价列表
export function bargainList(data) {
  return request({
    url: "/commodity/bargainList",
    method: "get",
    params: data,
  });
}
//支付方式列表
export function showHomePayType(query) {
  return request({
    // url: "/home/product/showHomePayType",
    url: "/mall/changePayType",
    method: "get",
    params: query,
  });
}
//提交商品
export function addPriGoods(data) {
  return request({
    url: "/supplier/localProduct/addPriGoods",
    method: "post",
    data,
  });
}

//获取本地商品列表
export function showLocalMallProduct(data) {
  return request({
    url: "/supplier/showLocalMallProduct",
    method: "post",
    data,
  });
}
//修改商品
export function getInfoPri(id) {
  return request({
    url: "/supplier/localProduct/getInfoPri/" + id,
    method: "get",
  });
}
//是否上架
export function updateIsShow(data) {
  return request({
    url: "/commodity/product/updatePriIsShow",
    method: "put",
    data,
  });
}
//同步分类

export function syncCategory() {
  return request({
    url: "/commodity/category/synProductCategory",
    method: "put",
  });
}
//修改商品
export function editPri(data) {
  return request({
    url: "/supplier/localProduct/editPri",
    method: "put",
    data,
  });
}
//是否热卖
export function updateIsRecommend(data) {
  return request({
    url: "/commodity/product/updateIsRecommend",
    method: "put",
    data,
  });
}
//子商城登录
export function mallIndex(data) {
  return request({
    url: "/system/mallLogin/mallIndex",
    method: "post",
    data,
  });
}

// 修改库存
export function changeLocalStockNum(data) {
  return request({
    url: "supplier/product/updateLocalStockNum",
    method: "put",
    data,
  });
}
// 修改排序
export function changeSort(data) {
  return request({
    url: "supplier/product/updateLocalSort",
    method: "put",
    data,
  });
}
//品牌列表
export function showBrandList() {
  return request({
    url: "/supplier/brand/showBrandList",
    method: "get",
  });
}
//扣点品牌
export function showPointBuckleList() {
  return request({
    url: "/supplier/point/showPointBuckleList",
    method: "get",
  });
}
//返现列表
export function showBankPriceList() {
  return request({
    url: "/supplier/bankPrice/showBankPriceList",
    method: "get",
  });
}
//添加规格模型

export function saveProductSpecItem(data) {
  return request({
    url: "/supplier/spec/saveProductSpecItem",
    method: "post",
    data,
  });
}
// 规格模型列表
export function queryProductSpecType() {
  return request({
    url: "/supplier/spec/queryProductSpecType",
    method: "get",
  });
}
// 获取模型详情
export function getProductSpecItem(query) {
  return request({
    url: "/supplier/spec/getProductSpecItem",
    method: "get",
    params: query,
  });
}
// 保存规格配置
export function saveProductSpecGoodsPrice(data) {
  return request({
    url: "/supplier/spec/saveProductSpecGoodsPrice",
    method: "post",
    data,
  });
}
// 获取规格详情
export function showProductSpecDetail(query) {
  return request({
    url: "/supplier/spec/showProductSpecDetail",
    method: "get",
    params: query,
  });
}
//批量审核
export function batchAudit(data) {
  return request({
    url: "/supplier/localProduct/batchAuditProduct",
    method: "post",
    data,
  });
}
// 获取审核后的商品列表
export function getProcessProductList(query) {
  return request({
    url: "/supplier/localProduct/getProcessProductList",
    method: "get",
    params: query,
  });
}
//获取商城列表
export function getCustomerShopList() {
  return request({
    url: "/mall/getCustomerShopList",
    method: "get",
  });
}
//提交拉取的商品
export function checkGoodsToChildren(data) {
  return request({
    url: "/supplier/localProduct/checkGoodsToChildren",
    method: "post",
    data,
  });
}
